<?php
/**
 * Created by PhpStorm.
 * User: Bostin
 * Date: 2019-02-14
 * Time: 17:59
 */

namespace Bostin\Translator\Provider;

/**
 * Class AbstractProvider
 * @package Bostin\Translator\Provider
 */
abstract class AbstractProvider
{
    /**
     * @var array
     */
    protected $config;

    /**
     * AbstractProvider constructor.
     * @param array $config
     */
    public function __construct(array $config)
    {
        $this->config = $config;
    }

    /**
     * @param string $sourceText
     * @param string $source
     * @param string $target
     * @return string|null
     */
    abstract public function textTranslate(string $sourceText, string $source, string $target):?string ;

    /**
     * @param string $sourceText
     * @param string $source
     * @param string $target
     * @return string|null
     */
    abstract public function imageTranslate(string $sourceText, string $source, string $target):?string ;

    /**
     * @param string $audioFormat
     * @param int $seq
     * @param int $isEnd
     * @param string $sourceText
     * @param string $source
     * @param string $target
     * @return string|null
     */
    abstract public function speechTranslate(string $audioFormat, int $seq, int $isEnd, string $sourceText, string $source, string $target):?string ;
}